package com.haois.ws.web.module.navigate.controller;

import com.haois.ws.web.module.navigate.service.NavigateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;
import java.util.Map;

/**
 * description
 *
 * @author RuiHaoZ on hgits.cn
 * @date 2018/11/7 15:06
 */
@Controller
@RequestMapping("/navigate/test")
public class NavigateController {

    @Autowired
    private NavigateService navigateService;

    @RequestMapping("/1")
    public ModelAndView test() {
        List<Map<String, Object>> n = navigateService.getUrlByNaviId(7);
        ModelAndView mv = new ModelAndView("/navi/index");
        mv.addObject("naviList", n);
        return mv;
    }
}
